using SalesPoint.Model;
using Xtensive.Orm;
using Xtensive.Orm.Security;

namespace SalesPoint.Security
{
  public class StockManagerRole : EmployeeRole
  {
    protected override void RegisterPermissions()
    {
      // Stock manager inherits Employee permissions
      base.RegisterPermissions();

      // Stock managers can see and edit products
      RegisterPermission(new Permission<Product>(canWrite:true));
    }

    public StockManagerRole(Session session)
      : base(session)
    {
    }
  }
}
